import request from '@/utils/request'

//
export function reqCoordinateList(query) {
  return request({
    url: '/manager/custom/assistToUserIndex',
    method: 'get',
    params: query
  })
}

//开启
export function reqCoordinateOpen(id) {
  return request({
    url: '/manager/custom/editStatusOpen?id=' + id,
    method: 'get'
  })
}

export function reqGetListById(data) {
  return request({
    url: '/manager/custom/assistUserIndex',
    method: 'get',
    params: data
  })
}

export function reqCustomCheckStatus(data) {
  return request({
    url: '/manager/api/getCustomCheckStatus',
    method: 'get',
    params: data
  })
}

//暂停
export function reqCoordinateClose(id) {
  return request({
    url: '/manager/custom/editStatusClose?id=' + id,
    method: 'get'
  })
}

export function reqRoleList(query) {
  return request({
    url: '/manager/assist/roleIndex',
    method: 'get',
    params: query
  })
}

//
export function reqRoleAllMenu(query) {
  return request({
    url: '/manager/api/roleAllMenu',
    method: 'get',
    params: query
  })
}

export function reqAddRole(data) {
  return request({
    url: '/manager/assist/roleAdd',
    method: 'post',
    data
  })
}

export function reqEditRole(data) {
  return request({
    url: '/manager/assist/roleEdit',
    method: 'post',
    data
  })
}

//开启
export function reqStatusOpenAlone(id) {
  return request({
    url: '/manager/assist/roleStatusOpen?id=' + id,
    method: 'get'
  })
}

//暂停
export function reqStatusStopAlone(id) {
  return request({
    url: '/manager/assist/roleStatusClose?id=' + id,
    method: 'get'
  })
}

export function reqGetRoleInfo(id) {
  return request({
    url: '/manager/assist/getRoleInfo?id=' + id,
    method: 'get'
  })
}

//根据角色获取相关菜单权限
export function reqGetRoleMenuList(id) {
  return request({
    url: '/manager/assist/getRoleMenuList?id=' + id,
    method: 'get'
  })
}

//协同管理导出
export function reqAssistToUserIndexExport(data) {
  return request({
    url: '/manager/custom/assistToUserIndexExport',
    method: 'post',
    data: data,
  })
}
//协同管理详情导出
export function reqAssistUserIndexExport(data) {
  return request({
    url: '/manager/custom/assistUserIndexExport',
    method: 'post',
    data: data,
  })
}
